package org.atovio.coolexam.entity;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.atovio.coolexam.common.Role;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {

    @NotNull(message = "账号不能为空")
    @Range(min = 1001, max = 3999, message = "账号错误")
    private Integer userId;

    private String userUuid;

    private String userName;

    private String realName;

    @NotBlank(message = "密码不能为空")
    @Length(min = 5, max = 12, message = "密码长度为{min}到{max}个字符")
    private String password;

    private Role role;

    private String phone;

    private String email;

    private String imagePath;

    private String token;
}

